package priv.wjh.study.elasticsearch.index;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "product_index")
public class ProductIndex {

    /**
     * 分词索引
     */
    @Id
    @Field(type = FieldType.Text)
    private String productName;

    @Field(type = FieldType.Integer)
    private Integer productId;
}
